<?php
    class SiteController extends Controller{
        public $layout='//layouts/table_normal';
       	public function actionIndex(){
    		// renders the view file 'protected/views/site/index.php'
    		// using the default layout 'protected/views/layouts/main.php'
    		$this->render('index');
    	}
        
        public function actionError(){
    	    if($error=Yii::app()->errorHandler->error){
    	    	if(Yii::app()->request->isAjaxRequest)
    	    		echo $error['message'];
    	    	else
    	        	$this->render('error', $error);
    	    }
	   }
    }

?>